#!/usr/bin/env python3
# -*- conding: utf-8 -*-

import sys

from matplotlib import pyplot as plt
import matplotlib


def mat_bar():
    """ 显示柱状图
    """
    # 指定默认字体
    matplotlib.rcParams['font.sans-serif'] = ['SimHei']
    
    plt.bar(range(5), [100,200,300,400,500], color='red')
    plt.xticks(range(5), ['A','B','C','D','E'])

    plt.xlabel('姓名')
    plt.ylabel('得分')
    plt.title('学生得分')
    plt.show()


if __name__ == "__main__":
    _type = "bar"
    _type = sys.argv[1]
    if _type == "bar":
        mat_bar()
    else:
        print("args error")
